package xuegao.study.mall.rbac.service;

import xuegao.study.mall.common.model.ums.UmsMenu;
import xuegao.study.mall.common.model.ums.UmsResource;
import xuegao.study.mall.common.model.ums.UmsRole;

import java.util.List;
import java.util.Map;

public interface UmsRoleService {

    List<UmsRole> getRolesListByAdminId(Long adminId);

    Map<String, List<String>> initResourceRolesMap();

    List<UmsRole> selectList(Integer pageNum, Integer pageSize, String name);

    List<UmsRole> listAll();

    int insertRole(UmsRole role);

    int updateRole(Long id, UmsRole role);

    int deleteById(Long id);

    List<UmsMenu> listMenuByRoleId(Long roleId);

    List<UmsResource> listResourceByRoleId(Long roleId);

    int allocMenu(Long roleId, List<Long> menuIds);

    int allocResource(Long roleId, List<Long> resourceIds);
}
